<template>
	<view class="menu">
		<view class="item" @click="GoHome()">
			<view class="iconfont icon-chengshi"></view>
			<text class="txt">我的房屋</text>
		</view>
		<view class="item" @click="GoCar()">
			<view class="iconfont icon-cheliang-"></view>
			<text class="txt">我的车辆</text>
		</view>
		<view class="item">
			<view class="iconfont icon-qiandaizi"></view>
			<text class="txt">我的缴费</text>
		</view>
		<view class="item">
			<view class="iconfont icon-icon-renyuan"></view>
			<text class="txt">家庭成员</text>
		</view>
	</view>
</template>

<script>
	export default {
		// 去除微信小程序生成多一层标签
		options : {
			virtualHost : true
		},
		data() {
			return {
				
			};
		},
		methods:{
			GoHome(){
				let token = uni.getStorageSync("token")
				if(!token){
					this.$message.error("请登录！！！！")
					uni.navigateTo({
						url:"/pages/Login/Login"
					})
				}
				uni.navigateTo({
					url:"/pages/Home/Home"
				})
			},
			GoCar(){
				let token = uni.getStorageSync("token")
				if(!token){
					this.$message.error("请登录！！！！")
					uni.navigateTo({
						url:"/pages/Login/Login"
					})
				}
				uni.navigateTo({
					url:"/pages/MyCar/MyCar"
				})
			}
		}
	}
</script>

<style lang="less">
	.menu{
		width: 100%;
		padding: 0 30rpx;
		box-sizing: border-box;
		// background-color: pink;
		display: flex;
		justify-content: space-around;
		margin-top: 200rpx;
		.item{
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			color: #ffffff;
			.icon-chengshi{
				padding: 10rpx 10rpx;
				background-color: #3c88f6;
				font-size: 45rpx;
				border-radius: 10rpx;
			}
			.icon-cheliang-{
				padding: 10rpx 10rpx;
				background-color: #57b988;
				font-size: 45rpx;
				border-radius: 10rpx;
			}
			.icon-qiandaizi{
				padding: 10rpx 10rpx;
				background-color: #ee9a52;
				font-size: 45rpx;
				border-radius: 10rpx;
			}
			.icon-icon-renyuan{
				padding: 10rpx 10rpx;
				background-color: #4f94f1;
				font-size: 45rpx;
				border-radius: 10rpx;
			}
			.txt{
				color: #282828;
				font-size: 25rpx;
				margin-top: 15rpx;
			}
		}
	}
</style>